const express = require('express');
const app = express()
const formGeneratorJSON = require('../mockData/formGenerator');
const utils = require('../../../plugin/utils/utils');

app.get('/wkNiceUci/nodeJS_formGenerator', (req, res) => {
    // 接收接口请求参数
    let requestPayload = req.body
    let nowDatetime = utils.getNowDateTime()
    console.log(nowDatetime, "接收接口请求参数/wkNiceUci/nodeJS_formGenerator", requestPayload)

    res.send({
        code: 200,
        success: true,
        msg: "操作成功",
        data: formGeneratorJSON,
    })
})

app.get('/wkNiceUci/nodeJS_formGenerator_structure', (req, res) => {
    // 接收接口请求参数
    let requestPayload = req.body
    let nowDatetime = utils.getNowDateTime()
    console.log(nowDatetime, "接收接口请求参数/wkNiceUci/nodeJS_formGenerator_structure", requestPayload)

    res.send({
        code: 200,
        success: true,
        msg: "操作成功",
        data: formGeneratorJSON.form.structure,
    })
})
module.exports = app;
